<meta charset="utf-8" />
<script>
    var name = prompt("请输入你你要翻译的英文")
    if (name == "dog") {
        document.write("狗")
    } else if (name == "cat") {
        document.write("猫")
    } else {
        document.write("查不到嘞")
    }
</script>